const app = getApp()

import v from '../../utils/validate'

Page({
  data: {
    list: [{
      name: '小明',
      age: 18
    },
    {
      name: '小宏',
      age: 18
    },
    {
      name: '小明1',
      age: 18
    },
    {
      name: '小明2',
      age: 182
    },
    {
      name: '小明',
      age: 18
    },
    {
      name: '小宏',
      age: 18
    },
    {
      name: '小明1',
      age: 18
    },
    {
      name: '小明2',
      age: 182
    },
    {
      name: '小明',
      age: 18
    },
    {
      name: '小宏',
      age: 18
    },
    {
      name: '小明1',
      age: 18
    },
    {
      name: '小明2',
      age: 182
    },
    {
      name: '小明',
      age: 18
    },
    {
      name: '小宏',
      age: 18
    },
    {
      name: '小明1',
      age: 18
    },
    {
      name: '小明2',
      age: 182
    }]
  },
  onLoad: function(options) {
    //Do some initialize when page load.
    // wx.getStorageSync('key')
  },
  onReady: function() {
    //Do some when page ready.
  },
  onShow: function() {
    //Do some when page show.
    this.getList()
  },
  onHide: function() {
    //Do some when page hide.
    
  },
  onUnload: function() {
    //Do some when page unload.
    
  },
  onPullDownRefresh: function() {
    //Do some when page pull down.
    
  },
  loadmore() {
    
  },
  refresh() {

  },
  async getList() {
    const data = await this.promisedemo()
    console.log(data)
  },
  promisedemo() {
    return new Promise((resolve, reject) => {
      resolve('测试')
    })
  }
})